#include <iostream>
#include <map>
#include <string>

using std::cout;
using std::endl;
using std::map;
using std::string;

void test()
{
    map<string, int> tmp = {
        {"world", 10},
        {"beijing", 20},
    };

    map<string, map<string, int>> number = {
        {"hello", { {"world", 10}} }
    };

    auto ret = number["hello"];
    map<string, int> ret2 = number["hello"];
    ret2["world"];

    /* number["hello"].second;//error */
    cout << number["hello"]["world"] << endl;//ok,10
    cout << number["hello"].begin()->second << endl;//ok,10
    cout << number["hello"].begin()->first<< endl;//ok,"world"
}

int main(int argc, char *argv[])
{
    test();
    return 0;
}

